home *** CD-ROM | disk | FTP | other *** search
/ Champak 139 / (Vol 139) Sep 24 2011.iso / Games / santa_mobile.swf / scripts / DefineSprite_234 / frame_3 / DoAction.as
Text File  |  2011-09-24  |  582b  |  26 lines

  1. if(-50 < getProperty(this, _X))
  2. {
  3.    setProperty(this, _X, getProperty(this, _X) - _root.speed);
  4.    setProperty(this, _Y, getProperty(this, _Y) + _root.speed / 7);
  5.    play();
  6. }
  7. else
  8. {
  9.    if(_root.bee1 == 1)
  10.    {
  11.       this.swapDepths(_root.tempo1);
  12.       _root.bee1 = 0;
  13.    }
  14.    setProperty(this, _X, 800);
  15.    time = getTimer() + random(10000) + 2000;
  16.    gotoAndPlay(1);
  17. }
  18. if(this.hitTest(_root.mobile))
  19. {
  20.    if(getProperty(_root.mobile, _Y) < getProperty(this, _Y) && _root.bee1 == 0)
  21.    {
  22.       _root.bee1 = 1;
  23.       this.swapDepths(_root.tempo1);
  24.    }
  25. }
  26.